Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an option to always display pagination #76

Closed
wants to merge 1 commit into from

Conversation

koraktor
Copy link

@koraktor koraktor commented Oct 5, 2010

To increase consistency of page layouts – even if there's only one page – it is handy to display pagination always. I added an option called :show_always that can be used for that purpose.

Example:
<%= will_paginate @collection, :show_always => true %>

@hotsen
Copy link

hotsen commented Apr 26, 2011

+1

@fweep
Copy link

fweep commented Apr 26, 2011

+1

UI requires disabled pagination controls even if there's only one page of data.

@elslooo
Copy link

elslooo commented Aug 13, 2011

+1. This definitely needs to be added =)!

@koraktor
Copy link
Author

Sure, but it won't merge into master anymore. Will have a look at the new architecture soon.

This option will force rendering the pagination even if there is
only one page to display.
@koraktor
Copy link
Author

Ok, here we go.
Updated the code to be in line with master.

@twopoint718
Copy link

+1

1 similar comment
@andrewstretche
Copy link

+1

@mcrowe
Copy link

mcrowe commented May 3, 2012

@mislav This looks like a great fork. Any reason to not have it in master?

@huerlisi
Copy link

I've run another rebase against @mislav's master. It's at huerlisi/will_paginate branch show_always.

@bshyong
Copy link

bshyong commented Dec 10, 2012

+1

1 similar comment
@punnie
Copy link

punnie commented Jan 9, 2013

+1

@mislav
Copy link
Owner

mislav commented Jan 10, 2013

Nope. If you want to display fake links that do nothing, feel free to use your own helper as fallback

<%= will_paginate(@posts) || fake_pagination %>

@keating
Copy link

keating commented Jan 10, 2013

Maybe I can accept @mislav 's solution……

@punnie
Copy link

punnie commented Jan 10, 2013

Sure. It's not really a difficult problem to circumvent, but a question of coherence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet